package com.gzz.orchid.main.facade.rsocket;

import org.springframework.stereotype.Component;

@Component
public class NotificationService {

    private final INotificationClient client;

    public NotificationService(INotificationClient client) {
        this.client = client;
    }

    public void startListening() {
        client.getNotifications()
                .doOnNext(System.out::println) // 打印收到的通知
                .subscribe();
    }
}

